package com.demo.studentmanager.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.demo.studentmanager.dao.ClassMapper;
import com.demo.studentmanager.dto.ClassListDto;
import com.demo.studentmanager.entity.StudentClass;
import com.demo.studentmanager.service.IClassService;
import com.demo.studentmanager.vo.ClassVo;
import org.springframework.stereotype.Service;

/**
 * @author zjia
 */
@Service
public class ClassServiceImpl extends ServiceImpl<ClassMapper, StudentClass> implements IClassService {

    @Override
    public IPage<ClassVo> getClassList(ClassListDto classListDto) {

        Page<ClassVo> page = new Page<>(classListDto.getCurrent(), classListDto.getSize());
        return baseMapper.getClassList(page, classListDto);
    }

}
